<style>
        .flow-content .row-sm { margin: 10px 10px 0px 10px; }
    </style>
    <div class="flow-content bg-white mm-loading" ng-show="info.showName == 'map'">
        <div class="row row-sm">
            <div class="col-sm-2 bg-white hide">
                <accordion close-others="false">
                    <accordion-group heading="流程节点概况" is-open="true">
                        <div>名称：{{info.nodeDetails.name || "空"}}</div>
                        <div>类型：{{info.nodeDetails.typeName || "空"}}</div>
                        <div class="hide">最新：XXX</div>
                        <div ng-show="info.flowArray.length">包含：{{info.flowArray.length || 0}}个流程</div>
                        <div ng-show="info.legendArray.length">包含：{{info.legendArray.length || 0}}个流程图例</div>
                        <div ng-show="info.nodeDetails.id && info.nodeDetails.parentId != '-1'">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="move(info.nodeDetails)">
                                <i class="fa fa-paw"></i> 移动
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails && info.nodeDetails.type == '1' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="addFlowFrame(info.nodeDetails)">
                                <i class="fa fa-plus"></i> 添加架构
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails && info.nodeDetails.type == '1' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="addFlow(info.nodeDetails)">
                                <i class="fa fa-plus"></i> 添加流程
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails.id && info.nodeDetails.parentId != '-1' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="updateTitle(info.nodeDetails)">
                                <i class="fa fa-cog"></i> 修改标题
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails.id && info.nodeDetails.type == '2' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="drawFlow(info.nodeDetails)">
                                <i class="fa fa-tag"></i> 绘制流程
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails.id && info.nodeDetails.type == '2' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="goToHistory(info.nodeDetails)">
                                <i class="fa fa-mail-reply"></i> 历史记录
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails.id && info.nodeDetails.parentId != '-1' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="removeNode(info.nodeDetails)">
                                <i class="fa fa-trash"></i> 删除
                            </button>
                        </div>
                        <div ng-show="info.nodeDetails.id && info.nodeDetails.parentId != '-1' && !info.isSort">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="toSort()">
                                <i class="fa fa-trash"></i> 排序
                            </button>
                        </div>
                    </accordion-group>
                </accordion>
            </div>
            <div class="col-sm-12">
                <winit-flow-map ng-if="!info.isSort" 
                                datas="info.flowData" 
                                diagram-scope="info.diagramScope" 
                                blur="getNodeDetails(data)" 
                                move-fun="move(data)" 
                                add-frame-fun="addFlowFrame(data)"
                                add-flow-fun="addFlow(data)"
                                edit-fun="updateTitle(data)"
                                draw-fun="drawFlow(data)"
                                history-fun="goToHistory(data)"
                                remove-fun="removeNode(data)"
                                sort-fun="toSort(data)">
                </winit-flow-map>
                <winit-sort ng-if="info.isSort" datas="info.childs" show-key="name" key="id" commit-fun="sortNode(list);"></winit-sort>
            </div>
        </div>
    </div>
    <div class="flow-content bg-white mm-loading" ng-if="info.showName == 'draw'">
        <div class="row row-sm">
            <div class="col-sm-12">
                <div class="col-sm-12" style="margin-bottom: 10px;">
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="请输入查询节点..." ng-model="draw.input" style="height: 36px;" ng-keyup="myKeyup($event)">
                            <span class="input-group-addon" title="查询" ng-click="searchNode()">
                                <i class="fa fa-search"></i>
                            </span>
                        </div>
                    <div class="col-sm-4"></div>
                </div>
                </div>
                <winit-flow-builder diagram-id="crtMasterDiagram" 
                                    datas="draw.masterFlowDatas" 
                                    diagram-scope="draw.diagramScope" 
                                    version="draw.nameAndVersion"
                                    is-show-version="true"
                                    click-fun="addFeatureOrFlow(data)">
                </winit-flow-builder>
            </div>
        </div>
    </div>
    
    <div class="flow-content bg-white mm-loading" ng-if="info.showName == 'history'">
        <div class="row row-sm">
            <div class="col-sm-2 bg-white">
                <accordion close-others="false">
                    <accordion-group heading="流程概况" is-open="true">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">名称：</label>
                                <div class="col-sm-8" title="{{ history.flowDetails.name || '空' }}">{{ history.flowDetails.name | limitTo: 15 }}...</div>
                            </div>
                        </div>
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">流程架构：</label>
                                <div class="col-sm-8" title="{{ history.flowDetails.frameName || '空' }}">{{ history.flowDetails.frameName | limitTo: 15 }}...</div>
                            </div>
                        </div>
                    </accordion-group>
                    <accordion-group heading="版本比较" is-open="true">
                        <div class="col-sm-12" style="margin-bottom: 10px;">
                            <m-ui-select prompt="请选择版本"
                                         itme-list="history.flowVersions"
                                         selected-item="history.sltPrevItem">
                            </m-ui-select>
                        </div>
                        <div class="col-sm-12" style="margin-bottom: 10px;">
                            <m-ui-select prompt="请选择版本"
                                         itme-list="history.flowVersions"
                                         selected-item="history.sltNextItem">
                            </m-ui-select>
                        </div>
                        <div class="col-sm-12">
                            <button class="btn btn-default btn-info col-sm-12" ng-click="compareHistory()">比较</button>
                            <button class="btn btn-default btn-primary col-sm-12" ng-click="view()" ng-show="history.showVersion" style="margin-top: 10px;">返回视图</button>
                        </div>
                    </accordion-group>
                </accordion>
            </div>
            <div class="col-sm-10">
                <version-diagram ng-if="!history.showVersion" go-model="history.modelVersion"></version-diagram>
                <winit-flow-builder ng-if="showHistory && history.showVersion"
                                    diagram-id="historyDiagram"
                                    datas="history.historyData" 
                                    is-show-version="true"
                                    version="history.prevNameVersion"
                                    is-fixed-height="true"
                                    min-height="400"
                                    is-readonly="true">
                </winit-flow-builder>
                <winit-flow-builder ng-if="showHistory && history.showVersion"
                                    diagram-id="compareDiagram"
                                    datas="history.compareData" 
                                    is-show-version="true"
                                    version="history.nextNameVersion"
                                    is-fixed-height="true"
                                    min-height="400"
                                    is-readonly="true">
                </winit-flow-builder>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12 mm-loading-icon" style="text-align: center; display: none; padding-top: 25%;">
            <i class="fa fa-spinner fa-spin fa-4x fa-fw" style="color: rgb(158, 149, 149);"></i>
        </div>
    </div>
    <winit-settings btn-list="settings.btnEle"></winit-settings>